home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d21
/
dvglue.arc
/
TVINTBIT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-01-09
|
2KB
|
52 lines
/*=======================================================*/
/* TVINTBIT.C */
/* functions to get and set second level interrupts */
/* */
/* (c) Copyright 1988 Ralf Brown All Rights Reserved */
/* May be freely copied for noncommercial use, so long */
/* as this copyright notice remains intact, and any */
/* changes are marked in the comment blocks preceding */
/* functions. */
/*=======================================================*/
#include "tvapi.h"
/*======================================================*/
/* TVgetbit--allocate a 2nd-level interrupt bit */
/* Ralf Brown 4/2/88 */
/*======================================================*/
WORD pascal TVgetbit(void far (*handler)(void))
{
_ES = FP_SEG(handler) ;
_DI = FP_OFF(handler) ;
_AX = 0x1013 ;
geninterrupt(0x15) ;
return _BX ; /* return the bitmask for allocated int, 0 if none avail */
}
/*======================================================*/
/* TVfreebit--deallocate a 2nd-level interrupt */
/* Ralf Brown 4/2/88 */
/*======================================================*/
void pascal TVfreebit(WORD bit)
{
_BX = bit ; /* bitmask from prior call to TVgetbit() */
_AX = 0x1014 ;
geninterrupt(0x15) ;
}
/*======================================================*/
/* TVsetbit--schedule a 2nd-level interrupt */
/* Ralf Brown 4/2/88 renamed from SetBit */
/*======================================================*/
void pascal TVsetbit(WORD bit) /* bit to set */
{
_BX = bit ;
_AX = 0x1015 ;
geninterrupt(0x15) ; /* issue the interrupt */
}